package com.hedl.practice.diyJava.multithreading.create_thread.test;

import com.hedl.practice.diyJava.multithreading.create_thread.entity.MyRunnable;
import com.hedl.practice.diyJava.multithreading.create_thread.entity.MyThread;

public class Study_1 {
    public static void main(String[] args) {
        Thread t1 = new MyThread();
        Thread t2 = new Thread(new MyThread());

        t1.start();      //start new Thread
        t2.start();     //start new Thread


        //lambda语句
        Thread t3 = new Thread(()->{
            System.out.println("Start new Thread t2");
        });
        t3.start();     //Start new Thread t2

        Thread t4 = new Thread(new MyRunnable());
        t4.start();

    }
}
